//
//  LevelScreenConfig.cpp
//  FruitCrush
//
//  Created by gaoyu on 15/8/8.
//
//

#include "LevelScreenConfig.h"
#include "MonsterConfig.h"

#define MATRIX_WIDTH (9)
#define MATRIX_HEIGHT (6)

#define GOLD_BASE_1    (6)
#define GOLD_GAP_1     (2)
#define GOLD_BASE_2    (50)
#define GOLD_GAP_2     (3)
#define GOLD_BASE_3    (140)
#define GOLD_GAP_3     (4)

int LevelScreenConfig::getMonsterType(int type)
{
    return type;
}

int LevelScreenConfig::getBombNum(int type)
{
    switch (type) {
        case LevelScreenTypeType39: return 5;
        case LevelScreenTypeType40: return 5;
        case LevelScreenTypeType41: return 5;
        case LevelScreenTypeType42: return 5;
        case LevelScreenTypeType43: return 10;
        case LevelScreenTypeType44: return 5;
        case LevelScreenTypeType45: return 10;
        case LevelScreenTypeType51: return 10;
        case LevelScreenTypeType52: return 15;
        case LevelScreenTypeType53: return 15;
        case LevelScreenTypeType54: return 15;
        case LevelScreenTypeType55: return 15;
        case LevelScreenTypeType61: return 15;
        case LevelScreenTypeType67: return 15;
        case LevelScreenTypeType69: return 15;
        default:
        	return 0;
    }
}

int LevelScreenConfig::getWinGold(int type)
{
    switch (type) {
        case LevelScreenTypeType01:
        case LevelScreenTypeType02:
        case LevelScreenTypeType03:
        case LevelScreenTypeType04:
        case LevelScreenTypeType05:
        case LevelScreenTypeType06:
        case LevelScreenTypeType07:
        case LevelScreenTypeType08:
        case LevelScreenTypeType09:
        case LevelScreenTypeType10:
        case LevelScreenTypeType11:
        case LevelScreenTypeType12:
        case LevelScreenTypeType13:
        case LevelScreenTypeType14:
        case LevelScreenTypeType15:
        case LevelScreenTypeType16:
        case LevelScreenTypeType17:
        case LevelScreenTypeType18:
        case LevelScreenTypeType19:
        case LevelScreenTypeType20: return GOLD_BASE_1+type*GOLD_GAP_1;
        case LevelScreenTypeType21:
        case LevelScreenTypeType22:
        case LevelScreenTypeType23:
        case LevelScreenTypeType24:
        case LevelScreenTypeType25:
        case LevelScreenTypeType26:
        case LevelScreenTypeType27:
        case LevelScreenTypeType28:
        case LevelScreenTypeType29:
        case LevelScreenTypeType30:
        case LevelScreenTypeType31:
        case LevelScreenTypeType32:
        case LevelScreenTypeType33:
        case LevelScreenTypeType34:
        case LevelScreenTypeType35:
        case LevelScreenTypeType36:
        case LevelScreenTypeType37:
        case LevelScreenTypeType38:
        case LevelScreenTypeType39:
        case LevelScreenTypeType40:
        case LevelScreenTypeType41:
        case LevelScreenTypeType42:
        case LevelScreenTypeType43:
        case LevelScreenTypeType44:
        case LevelScreenTypeType45:
        case LevelScreenTypeType46:
        case LevelScreenTypeType47:
        case LevelScreenTypeType48:
        case LevelScreenTypeType49:
        case LevelScreenTypeType50: return GOLD_BASE_2+(type-20)*GOLD_GAP_2;
        case LevelScreenTypeType51:
        case LevelScreenTypeType52:
        case LevelScreenTypeType53:
        case LevelScreenTypeType54:
        case LevelScreenTypeType55:
        case LevelScreenTypeType56:
        case LevelScreenTypeType57:
        case LevelScreenTypeType58:
        case LevelScreenTypeType59:
        case LevelScreenTypeType60:
        case LevelScreenTypeType61:
        case LevelScreenTypeType62:
        case LevelScreenTypeType63:
        case LevelScreenTypeType64:
        case LevelScreenTypeType65:
        case LevelScreenTypeType66:
        case LevelScreenTypeType67:
        case LevelScreenTypeType68:
        case LevelScreenTypeType69:
        case LevelScreenTypeType70: return GOLD_BASE_3+(type-50)*GOLD_GAP_3;

    }
    return 0;
}

bool* LevelScreenConfig::getBadStateMatrix(int type)
{
    switch (type) {
        case LevelScreenTypeType07:
        {
            int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
            bool* m_matrix = (bool*)malloc(arraySize);
            memset((void*)m_matrix, 0, arraySize);
            m_matrix[12] = true;m_matrix[14] = true;m_matrix[39] = true;m_matrix[41] = true;
            return m_matrix;
        }
        case LevelScreenTypeType08:
                {
                    int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                    bool* m_matrix = (bool*)malloc(arraySize);
                    memset((void*)m_matrix, 0, arraySize);
                    m_matrix[12] = true;m_matrix[14] = true;m_matrix[39] = true;m_matrix[41] = true;m_matrix[20] = true;
                    m_matrix[24] = true;m_matrix[29] = true;m_matrix[33] = true;
                    return m_matrix;
                }
        case LevelScreenTypeType09:
                {
                    int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                    bool* m_matrix = (bool*)malloc(arraySize);
                    memset((void*)m_matrix, 0, arraySize);
                    m_matrix[0] = true;m_matrix[8] = true;m_matrix[22] = true;m_matrix[31] = true;m_matrix[23] = true;
                    m_matrix[32] = true;m_matrix[45] = true;m_matrix[53] = true;
                    return m_matrix;
                }
        case LevelScreenTypeType10:
                {
                    int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                    bool* m_matrix = (bool*)malloc(arraySize);
                    memset((void*)m_matrix, 0, arraySize);
                    m_matrix[18] = true;m_matrix[19] = true;m_matrix[20] = true;m_matrix[21] = true;m_matrix[22] = true;
                    m_matrix[23] = true;m_matrix[24] = true;m_matrix[25] = true;m_matrix[26] = true;m_matrix[4]  = true;
                    m_matrix[13] = true;m_matrix[31] = true;m_matrix[40] = true;m_matrix[49] = true;
                    return m_matrix;
                }
        case LevelScreenTypeType15:
                {
                    int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                    bool* m_matrix = (bool*)malloc(arraySize);
                    memset((void*)m_matrix, 0, arraySize);
                    m_matrix[3] = true;m_matrix[5] = true;m_matrix[13] = true;m_matrix[21] = true;m_matrix[23] = true;
                    m_matrix[29] = true;m_matrix[33] = true;m_matrix[37] = true;m_matrix[43] = true;m_matrix[45]  = true;
                    m_matrix[53] = true;
                    return m_matrix;
                }
        case LevelScreenTypeType20:
        {
            int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
            bool* m_matrix = (bool*)malloc(arraySize);
            memset((void*)m_matrix, 0, arraySize);
            m_matrix[18] = true;m_matrix[19] = true;m_matrix[20] = true;m_matrix[21] = true;m_matrix[22] = true;m_matrix[23] = true;m_matrix[24] = true;m_matrix[25] = true;m_matrix[26] = true;m_matrix[27] = true;m_matrix[28] = true;m_matrix[29] = true;m_matrix[30] = true;m_matrix[31] = true;m_matrix[32] = true;m_matrix[33] = true;m_matrix[34] = true;m_matrix[35] = true;
            return m_matrix;
        }
        case LevelScreenTypeType27:
        {
            int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
            bool* m_matrix = (bool*)malloc(arraySize);
            memset((void*)m_matrix, 0, arraySize);
            m_matrix[12] = true;m_matrix[13] = true;m_matrix[14] = true;m_matrix[21] = true;m_matrix[23] = true;
            m_matrix[30] = true;m_matrix[31] = true;m_matrix[32] = true;
            return m_matrix;
        }
        case LevelScreenTypeType28:
        {
            int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
            bool* m_matrix = (bool*)malloc(arraySize);
            memset((void*)m_matrix, 0, arraySize);
            m_matrix[27] = true;m_matrix[28] = true;m_matrix[29] = true;m_matrix[30] = true;m_matrix[31] = true;
            m_matrix[32] = true;m_matrix[33] = true;m_matrix[34] = true;m_matrix[35] = true;
            return m_matrix;
        }
        case LevelScreenTypeType30:
        {
            int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
            bool* m_matrix = (bool*)malloc(arraySize);
            memset((void*)m_matrix, 0, arraySize);
            m_matrix[20] = true;m_matrix[21] = true;m_matrix[22] = true;m_matrix[23] = true;m_matrix[24] = true;
            m_matrix[29] = true;m_matrix[30] = true;m_matrix[31] = true;m_matrix[32] = true;m_matrix[33] = true;
            return m_matrix;
        }
        case LevelScreenTypeType34:
        {
            int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
            bool* m_matrix = (bool*)malloc(arraySize);
            memset((void*)m_matrix, 1, arraySize);
            return m_matrix;
        }
        case LevelScreenTypeType37:
        {
            int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
            bool* m_matrix = (bool*)malloc(arraySize);
            memset((void*)m_matrix, 1, arraySize);
            return m_matrix;
        }
        case LevelScreenTypeType43:
        {
            int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
            bool* m_matrix = (bool*)malloc(arraySize);
            memset((void*)m_matrix, 0, arraySize);
            memset((void*)m_matrix, 1, 9);
            m_matrix[9] = true;m_matrix[17] = true;m_matrix[18] = true;m_matrix[26] = true;m_matrix[27] = true;
            m_matrix[35] = true;m_matrix[36] = true;m_matrix[44] = true;m_matrix[45] = true;m_matrix[53] = true;


            return m_matrix;
        }
        case LevelScreenTypeType45:
        {
            int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
            bool* m_matrix = (bool*)malloc(arraySize);
            memset((void*)m_matrix, 0, arraySize);
            memset((void*)m_matrix, 1, 9);
            return m_matrix;
        }

    }
    return NULL;
}

bool* LevelScreenConfig::getBadUpStateMatrix(int type)
{
    switch (type) {
        case LevelScreenTypeType16:
                {
                    int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                    bool* m_matrix = (bool*)malloc(arraySize);
                    memset((void*)m_matrix, 0, arraySize);
                    m_matrix[3] = true;m_matrix[5] = true;m_matrix[13] = true;m_matrix[21] = true;m_matrix[23] = true;

                    return m_matrix;
                }
        case LevelScreenTypeType17:
        {
            int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
            bool* m_matrix = (bool*)malloc(arraySize);
            memset((void*)m_matrix, 0, arraySize);
            m_matrix[0] = true;m_matrix[1] = true;m_matrix[2] = true;m_matrix[3] = true;m_matrix[4] = true;m_matrix[5] = true;m_matrix[6] = true;m_matrix[7] = true;m_matrix[8] = true;            return m_matrix;
        }
        case LevelScreenTypeType18:
        {
            int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
            bool* m_matrix = (bool*)malloc(arraySize);
            memset((void*)m_matrix, 0, arraySize);
            m_matrix[0] = true;m_matrix[9] = true;m_matrix[18] = true;m_matrix[27] = true;m_matrix[36] = true;m_matrix[45] = true;m_matrix[8] = true;m_matrix[17] = true;m_matrix[26] = true;m_matrix[35] = true;m_matrix[44] = true;m_matrix[53] = true;
            return m_matrix;
        }
        case LevelScreenTypeType19:
        {
            int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
            bool* m_matrix = (bool*)malloc(arraySize);
            memset((void*)m_matrix, 0, arraySize);
            m_matrix[0] = true;m_matrix[9] = true;m_matrix[19] = true;m_matrix[29] = true;m_matrix[39] = true;m_matrix[49] = true;m_matrix[41] = true;m_matrix[33] = true;m_matrix[25] = true;m_matrix[17] = true;m_matrix[8] = true;
            return m_matrix;
        }
        case LevelScreenTypeType20:
        {
            int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
            bool* m_matrix = (bool*)malloc(arraySize);
            memset((void*)m_matrix, 0, arraySize);
            m_matrix[0] = true;m_matrix[1] = true;m_matrix[2] = true;m_matrix[3] = true;m_matrix[4] = true;m_matrix[5] = true;m_matrix[6] = true;m_matrix[7] = true;m_matrix[8] = true;m_matrix[9] = true;m_matrix[10] = true;m_matrix[11] = true;m_matrix[12] = true;m_matrix[13] = true;m_matrix[14] = true;m_matrix[15] = true;m_matrix[16] = true;m_matrix[17] = true;
            return m_matrix;
        }
        case LevelScreenTypeType26:
        {
            int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
            bool* m_matrix = (bool*)malloc(arraySize);
            memset((void*)m_matrix, 0, arraySize);
            m_matrix[0] = true;m_matrix[1] = true;m_matrix[2] = true;m_matrix[3] = true;m_matrix[4] = true;
            m_matrix[5] = true;m_matrix[6] = true;m_matrix[7] = true;m_matrix[8] = true;m_matrix[9] = true;
            m_matrix[11] = true;m_matrix[12] = true;m_matrix[14] = true;m_matrix[15] = true;m_matrix[17] = true;
            m_matrix[18] = true;m_matrix[19] = true;m_matrix[20] = true;m_matrix[21] = true;m_matrix[22] = true;
            m_matrix[23] = true;m_matrix[24] = true;m_matrix[25] = true;m_matrix[26] = true;
            return m_matrix;
        }
        case LevelScreenTypeType27:
        {
            int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
            bool* m_matrix = (bool*)malloc(arraySize);
            memset((void*)m_matrix, 0, arraySize);
            m_matrix[1] = true;m_matrix[9] = true;m_matrix[10] = true;m_matrix[7] = true;m_matrix[16] = true;
            m_matrix[17] = true;m_matrix[36] = true;m_matrix[37] = true;m_matrix[43] = true;m_matrix[44] = true;
            m_matrix[46] = true;m_matrix[52] = true;
            return m_matrix;
        }
        case LevelScreenTypeType28:
        {
            int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
            bool* m_matrix = (bool*)malloc(arraySize);
            memset((void*)m_matrix, 0, arraySize);
            m_matrix[0] = true;m_matrix[1] = true;m_matrix[2] = true;m_matrix[3] = true;m_matrix[4] = true;
            m_matrix[5] = true;m_matrix[6] = true;m_matrix[7] = true;m_matrix[8] = true;m_matrix[18] = true;
            m_matrix[19] = true;m_matrix[20] = true;m_matrix[21] = true;m_matrix[22] = true;m_matrix[23] = true;
            m_matrix[24] = true;m_matrix[25] = true;m_matrix[26] = true;
            return m_matrix;
        }
        case LevelScreenTypeType29:
        {
            int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
            bool* m_matrix = (bool*)malloc(arraySize);
            memset((void*)m_matrix, 0, arraySize);
            m_matrix[1] = true;m_matrix[3] = true;m_matrix[5] = true;m_matrix[7] = true;m_matrix[9] = true;
            m_matrix[11] = true;m_matrix[13] = true;m_matrix[15] = true;m_matrix[17] = true;m_matrix[19] = true;
            m_matrix[21] = true;m_matrix[23] = true;m_matrix[25] = true;
            return m_matrix;
        }
        case LevelScreenTypeType30:
        {
            int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
            bool* m_matrix = (bool*)malloc(arraySize);
            memset((void*)m_matrix, 0, arraySize);
            m_matrix[10] = true;m_matrix[11] = true;m_matrix[12] = true;m_matrix[13] = true;m_matrix[14] = true;
            m_matrix[15] = true;m_matrix[16] = true;m_matrix[19] = true;m_matrix[25] = true;m_matrix[28] = true;
            m_matrix[34] = true;m_matrix[37] = true;m_matrix[38] = true;m_matrix[39] = true;m_matrix[40] = true;
            m_matrix[41] = true;m_matrix[42] = true;m_matrix[43] = true;
            return m_matrix;
        }
        case LevelScreenTypeType31:
        {
            int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
            bool* m_matrix = (bool*)malloc(arraySize);
            memset((void*)m_matrix, 0, arraySize);
            m_matrix[3] = true;m_matrix[4] = true;m_matrix[5] = true;m_matrix[12] = true;m_matrix[13] = true;
            m_matrix[14] = true;m_matrix[21] = true;m_matrix[22] = true;m_matrix[23] = true;m_matrix[30] = true;
            m_matrix[31] = true;m_matrix[32] = true;m_matrix[39] = true;m_matrix[40] = true;m_matrix[41] = true;
            m_matrix[48] = true;m_matrix[49] = true;m_matrix[50] = true;
            return m_matrix;
        }
        case LevelScreenTypeType32:
        {
            int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
            bool* m_matrix = (bool*)malloc(arraySize);
            memset((void*)m_matrix, 0, arraySize);
            m_matrix[9] = true;m_matrix[10] = true;m_matrix[11] = true;m_matrix[12] = true;m_matrix[13] = true;
            m_matrix[14] = true;m_matrix[15] = true;m_matrix[16] = true;m_matrix[17] = true;m_matrix[27] = true;
            m_matrix[28] = true;m_matrix[29] = true;m_matrix[30] = true;m_matrix[31] = true;m_matrix[32] = true;
            m_matrix[33] = true;m_matrix[34] = true;m_matrix[35] = true;
            return m_matrix;
        }
        case LevelScreenTypeType33:
        {
            int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
            bool* m_matrix = (bool*)malloc(arraySize);
            memset((void*)m_matrix, 0, arraySize);
            m_matrix[0] = true;m_matrix[1] = true;m_matrix[9] = true;m_matrix[10] = true;m_matrix[18] = true;
            m_matrix[19] = true;m_matrix[27] = true;m_matrix[28] = true;m_matrix[36] = true;m_matrix[37] = true;
            m_matrix[45] = true;m_matrix[46] = true;m_matrix[7] = true;m_matrix[8] = true;m_matrix[16] = true;
            m_matrix[17] = true;m_matrix[25] = true;m_matrix[26] = true;m_matrix[34] = true;m_matrix[35] = true;
            m_matrix[43] = true;m_matrix[44] = true;m_matrix[52] = true;m_matrix[53] = true;
            return m_matrix;
        }
        case LevelScreenTypeType35:
        {
            int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
            bool* m_matrix = (bool*)malloc(arraySize);
            memset((void*)m_matrix, 1, arraySize);
            m_matrix[48] = 0;m_matrix[49] = 0;m_matrix[50] = 0;m_matrix[39] = 0;m_matrix[40] = 0;
            m_matrix[41] = 0;m_matrix[30] = 0;m_matrix[31] = 0;m_matrix[32] = 0;
            return m_matrix;
        }
        case LevelScreenTypeType36:
        {
            int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
            bool* m_matrix = (bool*)malloc(arraySize);
            memset((void*)m_matrix, 0, arraySize);
            m_matrix[27] = 1;m_matrix[28] = 1;m_matrix[29] = 1;m_matrix[30] = 1;m_matrix[31] = 1;
            m_matrix[32] = 1;m_matrix[33] = 1;m_matrix[34] = 1;m_matrix[35] = 1;
            return m_matrix;
        }
        case LevelScreenTypeType40:
        {
            int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
            bool* m_matrix = (bool*)malloc(arraySize);
            memset((void*)m_matrix, 0, arraySize);
            memset((void*)m_matrix, 1, 9);
            return m_matrix;
        }
        case LevelScreenTypeType42:
        {
            int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
            bool* m_matrix = (bool*)malloc(arraySize);
            memset((void*)m_matrix, 0, arraySize);
            m_matrix[1] = 1;m_matrix[7] = 1;m_matrix[10] = 1;m_matrix[16] = 1;m_matrix[19] = 1;
            m_matrix[25] = 1;m_matrix[28] = 1;m_matrix[34] = 1;m_matrix[37] = 1;m_matrix[43] = 1;
            m_matrix[46] = 1;m_matrix[52] = 1;
            return m_matrix;
        }
        case LevelScreenTypeType44:
        {
            int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
            bool* m_matrix = (bool*)malloc(arraySize);
            memset((void*)m_matrix, 0, arraySize);
            memset((void*)m_matrix, 1, 27);
            memset((void*)m_matrix, 0, 9);
            return m_matrix;
        }
        case LevelScreenTypeType45:
        {
            int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
            bool* m_matrix = (bool*)malloc(arraySize);
            memset((void*)m_matrix, 0, arraySize);
            memset((void*)m_matrix, 1, 30);
            m_matrix[33] = 1;m_matrix[34] = 1;m_matrix[35] = 1;m_matrix[36] = 1;m_matrix[37] = 1;
            m_matrix[43] = 1;m_matrix[44] = 1;m_matrix[45] = 1;m_matrix[53] = 1;m_matrix[22] = 0;
            return m_matrix;
        }
        case LevelScreenTypeType47:
        {
            int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
            bool* m_matrix = (bool*)malloc(arraySize);
            memset((void*)m_matrix, 0, arraySize);
            memset((void*)m_matrix, 1, 18);
            memset((void*)m_matrix, 0, 9);
            return m_matrix;
        }
        case LevelScreenTypeType48:
        {
            int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
            bool* m_matrix = (bool*)malloc(arraySize);
            memset((void*)m_matrix, 0, arraySize);
            memset((void*)m_matrix, 1, 27);
            m_matrix[0] = 0;m_matrix[8] = 0;
            return m_matrix;
        }
        case LevelScreenTypeType49:
        {
            int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
            bool* m_matrix = (bool*)malloc(arraySize);
            memset((void*)m_matrix, 0, arraySize);
            memset((void*)m_matrix, 1, arraySize-9);
            memset((void*)m_matrix, 0, arraySize-18);
            memset((void*)m_matrix, 1, 18);
            memset((void*)m_matrix, 0, 9);
            return m_matrix;
        }
        case LevelScreenTypeType50:
        {
            int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
            bool* m_matrix = (bool*)malloc(arraySize);
            memset((void*)m_matrix, 1, arraySize);
            memset((void*)m_matrix, 0, arraySize-9);
            memset((void*)m_matrix, 1, 9);
            m_matrix[9] = 1;m_matrix[17] = 1;m_matrix[18] = 1;m_matrix[26] = 1;
            m_matrix[27] = 1;m_matrix[35] = 1;m_matrix[36] = 1;m_matrix[44] = 1;
            return m_matrix;
        }
        case LevelScreenTypeType54:
        {
            int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
            bool* m_matrix = (bool*)malloc(arraySize);
            memset((void*)m_matrix, 1, arraySize);
            memset((void*)m_matrix, 0, 27);
            return m_matrix;
        }
        case LevelScreenTypeType55:
        {
            int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
            bool* m_matrix = (bool*)malloc(arraySize);
            memset((void*)m_matrix, 0, arraySize);
            for(int row =0;row < 6;row++)
            	for(int col =0;col<9;col++){
            		if((row * 9 + col)%2 == 1)
            			m_matrix[row * 9 + col] = 1;
            	}
            return m_matrix;
        }
        case LevelScreenTypeType63:
        {
            int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
            bool* m_matrix = (bool*)malloc(arraySize);
            memset((void*)m_matrix, 0, arraySize);
            m_matrix[13] = 1;m_matrix[22] = 1;m_matrix[31] = 1;
            return m_matrix;
        }
        case LevelScreenTypeType68:
        {
            int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
            bool* m_matrix = (bool*)malloc(arraySize);
            memset((void*)m_matrix, 0, arraySize);
            m_matrix[9] = 1;m_matrix[18] = 1;m_matrix[27] = 1;m_matrix[36] = 1;
            m_matrix[17] = 1;m_matrix[26] = 1;m_matrix[35] = 1;m_matrix[44] = 1;
            m_matrix[0] = 1;m_matrix[8] = 1;
            return m_matrix;
        }

    }
    return NULL;
}

bool* LevelScreenConfig::getJellyMatrix(int type)
{
    switch (type) {
        case LevelScreenTypeType21:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[0] = true;m_matrix[2] = true;m_matrix[4] = true;m_matrix[6] = true;m_matrix[8] = true;

                return m_matrix;
            }
        case LevelScreenTypeType22:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[0] = true;m_matrix[9] = true;m_matrix[18] = true;m_matrix[27] = true;m_matrix[36] = true;
                m_matrix[45] = true;

                return m_matrix;
            }
        case LevelScreenTypeType23:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[4] = true;m_matrix[13] = true;m_matrix[22] = true;m_matrix[31] = true;m_matrix[40] = true;
                m_matrix[49] = true;m_matrix[0] = true;m_matrix[8] = true;

                return m_matrix;
            }
        case LevelScreenTypeType24:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[0] = true;m_matrix[1] = true;m_matrix[2] = true;m_matrix[3] = true;m_matrix[4] = true;
                m_matrix[5] = true;m_matrix[6] = true;m_matrix[7] = true;m_matrix[8] = true;m_matrix[9] = true;
                m_matrix[17] = true;m_matrix[18] = true;m_matrix[19] = true;m_matrix[20] = true;m_matrix[21] = true;
                m_matrix[22] = true;m_matrix[23] = true;m_matrix[24] = true;m_matrix[25] = true;m_matrix[26] = true;
                return m_matrix;
            }
        case LevelScreenTypeType25:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[0] = true;m_matrix[1] = true;m_matrix[2] = true;m_matrix[3] = true;m_matrix[4] = true;
                m_matrix[5] = true;m_matrix[6] = true;m_matrix[7] = true;m_matrix[8] = true;m_matrix[9] = true;
                m_matrix[17] = true;m_matrix[18] = true;m_matrix[26] = true;m_matrix[27] = true;m_matrix[35] = true;
                m_matrix[36] = true;m_matrix[44] = true;m_matrix[45] = true;m_matrix[46] = true;m_matrix[47] = true;
                m_matrix[48] = true;m_matrix[49] = true;m_matrix[50] = true;m_matrix[51] = true;m_matrix[52] = true;
                m_matrix[53] = true;
                return m_matrix;
            }
        case LevelScreenTypeType26:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[10] = true;m_matrix[13] = true;m_matrix[16] = true;

                return m_matrix;
            }
        case LevelScreenTypeType27:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[0] = true;m_matrix[8] = true;m_matrix[45] = true;m_matrix[53] = true;m_matrix[22] = true;

                return m_matrix;
            }
        case LevelScreenTypeType28:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[10] = true;m_matrix[11] = true;m_matrix[12] = true;m_matrix[13] = true;m_matrix[14] = true;
                m_matrix[15] = true;m_matrix[16] = true;m_matrix[9] = true;m_matrix[17] = true;

                return m_matrix;
            }
        case LevelScreenTypeType29:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[0] = true;m_matrix[2] = true;m_matrix[4] = true;m_matrix[6] = true;m_matrix[8] = true;
                m_matrix[10] = true;m_matrix[12] = true;m_matrix[14] = true;m_matrix[16] = true;m_matrix[18] = true;
                m_matrix[20] = true;m_matrix[22] = true;m_matrix[24] = true;m_matrix[26] = true;
                return m_matrix;
            }
        case LevelScreenTypeType30:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[0] = true;m_matrix[1] = true;m_matrix[2] = true;m_matrix[3] = true;m_matrix[4] = true;
                m_matrix[5] = true;m_matrix[6] = true;m_matrix[7] = true;m_matrix[8] = true;m_matrix[9] = true;
                m_matrix[17] = true;m_matrix[18] = true;m_matrix[26] = true;m_matrix[27] = true;m_matrix[35] = true;
                m_matrix[36] = true;m_matrix[44] = true;m_matrix[45] = true;m_matrix[46] = true;m_matrix[47] = true;
                m_matrix[48] = true;m_matrix[49] = true;m_matrix[50] = true;m_matrix[51] = true;m_matrix[52] = true;
                m_matrix[53] = true;
                return m_matrix;
            }
        case LevelScreenTypeType31:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[0] = true;m_matrix[8] = true;

                return m_matrix;
            }
        case LevelScreenTypeType32:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[18] = true;m_matrix[26] = true;

                return m_matrix;
            }
        case LevelScreenTypeType33:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[4] = true;m_matrix[13] = true;m_matrix[22] = true;m_matrix[31] = true;
                m_matrix[40] = true;m_matrix[49] = true;

                return m_matrix;
            }
        case LevelScreenTypeType34:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[0] = true;m_matrix[8] = true;m_matrix[22] = true;

                return m_matrix;
            }
        case LevelScreenTypeType35:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[0] = true;m_matrix[8] = true;m_matrix[45] = true;m_matrix[53] = true;

                return m_matrix;
            }
        case LevelScreenTypeType36:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                memset((void*)m_matrix, 1, arraySize/2);

                return m_matrix;
            }
        case LevelScreenTypeType37:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 1, arraySize);
                m_matrix[3] = 0;m_matrix[4] = 0;m_matrix[5] = 0;m_matrix[12] = 0;m_matrix[13] = 0;
                m_matrix[14] = 0;m_matrix[21] = 0;m_matrix[22] = 0;m_matrix[23] = 0;m_matrix[30] = 0;
                m_matrix[31] = 0;m_matrix[32] = 0;m_matrix[39] = 0;m_matrix[40] = 0;m_matrix[41] = 0;
                m_matrix[48] = 0;m_matrix[49] = 0;m_matrix[50] = 0;

                return m_matrix;
            }
        case LevelScreenTypeType41:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                memset((void*)m_matrix, 1, 9);

                return m_matrix;
            }
        case LevelScreenTypeType42:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[0] = 1;m_matrix[8] = 1;m_matrix[9] = 1;m_matrix[17] = 1;m_matrix[18] = 1;
                m_matrix[26] = 1;m_matrix[27] = 1;m_matrix[35] = 1;m_matrix[36] = 1;m_matrix[44] = 1;
                m_matrix[45] = 1;m_matrix[53] = 1;

                return m_matrix;
            }
        case LevelScreenTypeType44:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                memset((void*)m_matrix, 1, 9);
                return m_matrix;
            }
        case LevelScreenTypeType45:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[0] = 1;m_matrix[8] = 1;
                return m_matrix;
            }
        case LevelScreenTypeType48:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[0] = 1;m_matrix[8] = 1;
                return m_matrix;
            }
        case LevelScreenTypeType50:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[0] = 1;m_matrix[8] = 1;m_matrix[45] = 1;m_matrix[53] = 1;
                return m_matrix;
            }
        case LevelScreenTypeType53:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[0] = 1;m_matrix[8] = 1;m_matrix[45] = 1;m_matrix[53] = 1;
                return m_matrix;
            }
        case LevelScreenTypeType55:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[0] = 1;m_matrix[8] = 1;
                return m_matrix;
            }
        case LevelScreenTypeType59:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[0] = 1;m_matrix[8] = 1;
                return m_matrix;
            }
        case LevelScreenTypeType66:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[0] = 1;m_matrix[8] = 1;
                return m_matrix;
            }
        case LevelScreenTypeType68:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[45] = 1;m_matrix[53] = 1;
                return m_matrix;
            }
        case LevelScreenTypeType69:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[4] = 1;
                return m_matrix;
            }

    }
    return NULL;
}


bool* LevelScreenConfig::getProtectCoverMatrix(int type)
{
    switch (type) {
        case LevelScreenTypeType46:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                memset((void*)m_matrix, 1, 9);

                return m_matrix;
            }
        case LevelScreenTypeType47:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                memset((void*)m_matrix, 1, 9);

                return m_matrix;
            }
        case LevelScreenTypeType48:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[0] = 1;m_matrix[8] = 1;

                return m_matrix;
            }
        case LevelScreenTypeType49:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 1, arraySize);
                memset((void*)m_matrix, 0, arraySize-9);
                memset((void*)m_matrix, 1, 9);
                return m_matrix;
            }
        case LevelScreenTypeType50:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 1, arraySize);
                memset((void*)m_matrix, 0, arraySize-9);
                memset((void*)m_matrix, 1, 9);
                m_matrix[9] = 1;m_matrix[17] = 1;m_matrix[18] = 1;m_matrix[26] = 1;
                m_matrix[27] = 1;m_matrix[35] = 1;m_matrix[36] = 1;m_matrix[44] = 1;
                return m_matrix;
            }
        case LevelScreenTypeType51:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                memset((void*)m_matrix, 1, 9);
                return m_matrix;
            }
        case LevelScreenTypeType52:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 1, arraySize);
                memset((void*)m_matrix, 0, arraySize-18);
                memset((void*)m_matrix, 1, 18);
                return m_matrix;
            }
        case LevelScreenTypeType53:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                memset((void*)m_matrix, 1, arraySize-18);
                memset((void*)m_matrix, 0, 18);
                return m_matrix;
            }
        case LevelScreenTypeType54:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                memset((void*)m_matrix, 1, 27);
                return m_matrix;
            }
        case LevelScreenTypeType55:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                for(int row =0;row < 6;row++)
                	for(int col =0;col<9;col++){
                		if((row * 9 + col)%2 == 0)
                			m_matrix[row * 9 + col] = 1;
                	}
                return m_matrix;
            }
        case LevelScreenTypeType56:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[8] = 1;
                return m_matrix;
            }
        case LevelScreenTypeType57:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[0] = 1;m_matrix[9] = 1;m_matrix[18] = 1;
                return m_matrix;
            }
        case LevelScreenTypeType58:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[19] = 1;m_matrix[20] = 1;m_matrix[28] = 1;m_matrix[29] = 1;
                m_matrix[24] = 1;m_matrix[25] = 1;m_matrix[33] = 1;m_matrix[34] = 1;
                return m_matrix;
            }
        case LevelScreenTypeType59:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[0] = 1;m_matrix[9] = 1;m_matrix[18] = 1;m_matrix[8] = 1;
                m_matrix[17] = 1;m_matrix[26] = 1;
                return m_matrix;
            }
        case LevelScreenTypeType60:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[11] = 1;m_matrix[12] = 1;m_matrix[13] = 1;m_matrix[14] = 1;
                m_matrix[15] = 1;m_matrix[20] = 1;m_matrix[21] = 1;m_matrix[42] = 1;
                m_matrix[22] = 1;m_matrix[23] = 1;m_matrix[24] = 1;m_matrix[29] = 1;
                m_matrix[30] = 1;m_matrix[31] = 1;m_matrix[32] = 1;m_matrix[33] = 1;
                m_matrix[38] = 1;m_matrix[39] = 1;m_matrix[40] = 1;m_matrix[41] = 1;
                m_matrix[2] = 1;m_matrix[10] = 1;m_matrix[6] = 1;m_matrix[16] = 1;
                m_matrix[37] = 1;m_matrix[47] = 1;m_matrix[43] = 1;m_matrix[51] = 1;
                return m_matrix;
            }
        case LevelScreenTypeType61:
             {
                 int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                 bool* m_matrix = (bool*)malloc(arraySize);
                 memset((void*)m_matrix, 0, arraySize);
                 m_matrix[19] = 1;m_matrix[21] = 1;m_matrix[23] = 1;m_matrix[25] = 1;
                 return m_matrix;
             }
        case LevelScreenTypeType62:
             {
                 int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                 bool* m_matrix = (bool*)malloc(arraySize);
                 memset((void*)m_matrix, 1, arraySize);
                 memset((void*)m_matrix, 0, arraySize-9);
                 memset((void*)m_matrix, 1, 9);
                 return m_matrix;
             }
        case LevelScreenTypeType63:
             {
                 int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                 bool* m_matrix = (bool*)malloc(arraySize);
                 memset((void*)m_matrix, 0, arraySize);
                 m_matrix[13] = 1;m_matrix[22] = 1;m_matrix[31] = 1;
                 return m_matrix;
             }
        case LevelScreenTypeType64:
             {
                 int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                 bool* m_matrix = (bool*)malloc(arraySize);
                 memset((void*)m_matrix, 0, arraySize);
                 m_matrix[0] = 1;m_matrix[1] = 1;m_matrix[2] = 1;m_matrix[9] = 1;
                 m_matrix[10] = 1;m_matrix[11] = 1;
                 return m_matrix;
             }
        case LevelScreenTypeType65:
             {
                 int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                 bool* m_matrix = (bool*)malloc(arraySize);
                 memset((void*)m_matrix, 0, arraySize);
                 m_matrix[22] = 1;m_matrix[2] = 1;m_matrix[3] = 1;m_matrix[4] = 1;
                 m_matrix[5] = 1;m_matrix[6] = 1;m_matrix[11] = 1;m_matrix[15] = 1;
                 m_matrix[20] = 1;m_matrix[24] = 1;m_matrix[29] = 1;m_matrix[33] = 1;
                 m_matrix[38] = 1;m_matrix[39] = 1;m_matrix[40] = 1;
                 m_matrix[41] = 1;m_matrix[42] = 1;
                 return m_matrix;
             }
        case LevelScreenTypeType66:
             {
                 int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                 bool* m_matrix = (bool*)malloc(arraySize);
                 memset((void*)m_matrix, 0, arraySize);
                 memset((void*)m_matrix, 1, 9);
                 return m_matrix;
             }
        case LevelScreenTypeType67:
             {
                 int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                 bool* m_matrix = (bool*)malloc(arraySize);
                 memset((void*)m_matrix, 0, arraySize);
                 m_matrix[0] = 1;m_matrix[8] = 1;
                 return m_matrix;
             }
        case LevelScreenTypeType68:
             {
                 int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                 bool* m_matrix = (bool*)malloc(arraySize);
                 memset((void*)m_matrix, 0, arraySize);
                 m_matrix[47] = 1;m_matrix[48] = 1;m_matrix[49] = 1;m_matrix[50] = 1;
                 m_matrix[51] = 1;
                 return m_matrix;
             }
        case LevelScreenTypeType69:
             {
                 int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                 bool* m_matrix = (bool*)malloc(arraySize);
                 memset((void*)m_matrix, 0, arraySize);
                 m_matrix[0] = 1;m_matrix[8] = 1;m_matrix[45] = 1;m_matrix[53] = 1;
                 return m_matrix;
             }

    }
    return NULL;
}

bool* LevelScreenConfig::getBlankMatrix(int type)
{
    switch (type) {
        case LevelScreenTypeType56:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[7] = 1;m_matrix[16] = 1;m_matrix[17] = 1;
                return m_matrix;
            }
        case LevelScreenTypeType57:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[1] = 1;m_matrix[10] = 1;m_matrix[19] = 1;m_matrix[28] = 1;
                m_matrix[37] = 1;m_matrix[46] = 1;
                return m_matrix;
            }
        case LevelScreenTypeType58:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 1, arraySize);
                memset((void*)m_matrix, 0, arraySize-9);
                memset((void*)m_matrix, 1, 9);
                m_matrix[13] = 1;m_matrix[22] = 1;m_matrix[31] = 1;m_matrix[40] = 1;

                return m_matrix;
            }
        case LevelScreenTypeType59:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[1] = 1;m_matrix[10] = 1;m_matrix[19] = 1;m_matrix[7] = 1;
                m_matrix[16] = 1;m_matrix[25] = 1;
                return m_matrix;
            }
        case LevelScreenTypeType60:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[27] = 1;m_matrix[28] = 1;m_matrix[19] = 1;m_matrix[18] = 1;
                m_matrix[34] = 1;m_matrix[35] = 1;m_matrix[25] = 1;m_matrix[26] = 1;
                m_matrix[3] = 1;m_matrix[4] = 1;m_matrix[5] = 1;m_matrix[48] = 1;
                m_matrix[49] = 1;m_matrix[50] = 1;
                return m_matrix;
            }
        case LevelScreenTypeType61:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[18] = 1;m_matrix[29] = 1;m_matrix[22] = 1;m_matrix[33] = 1;
                m_matrix[26] = 1;m_matrix[0] = 1;m_matrix[9] = 1;m_matrix[4] = 1;
                m_matrix[13] = 1;m_matrix[8] = 1;m_matrix[17] = 1;
                return m_matrix;
            }
        case LevelScreenTypeType62:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[9] = 1;m_matrix[18] = 1;m_matrix[27] = 1;m_matrix[36] = 1;
                m_matrix[17] = 1;m_matrix[26] = 1;m_matrix[35] = 1;m_matrix[44] = 1;
                m_matrix[49] = 1;m_matrix[40] = 1;m_matrix[13] = 1;m_matrix[4] = 1;
                return m_matrix;
            }
        case LevelScreenTypeType63:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[12] = 1;m_matrix[21] = 1;m_matrix[30] = 1;m_matrix[14] = 1;
                m_matrix[23] = 1;m_matrix[32] = 1;
                return m_matrix;
            }
        case LevelScreenTypeType64:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[45] = 1;m_matrix[46] = 1;m_matrix[47] = 1;m_matrix[48] = 1;
                m_matrix[49] = 1;m_matrix[50] = 1;m_matrix[36] = 1;m_matrix[37] = 1;
                m_matrix[38] = 1;m_matrix[39] = 1;m_matrix[40] = 1;m_matrix[41] = 1;
                m_matrix[27] = 1;m_matrix[28] = 1;m_matrix[29] = 1;m_matrix[18] = 1;
                m_matrix[19] = 1;m_matrix[20] = 1;
                return m_matrix;
            }
        case LevelScreenTypeType65:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[12] = 1;m_matrix[13] = 1;m_matrix[14] = 1;m_matrix[21] = 1;
                m_matrix[23] = 1;m_matrix[30] = 1;m_matrix[31] = 1;m_matrix[32] = 1;
                return m_matrix;
            }
        case LevelScreenTypeType66:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                memset((void*)m_matrix, 1, 18);
                memset((void*)m_matrix, 0, 9);
                return m_matrix;
            }
        case LevelScreenTypeType67:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[10] = 1;m_matrix[16] = 1;m_matrix[37] = 1;m_matrix[43] = 1;
                m_matrix[21] = 1;m_matrix[23] = 1;
                return m_matrix;
            }
        case LevelScreenTypeType68:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                m_matrix[10] = 1;m_matrix[19] = 1;m_matrix[28] = 1;m_matrix[37] = 1;
                m_matrix[46] = 1;m_matrix[16] = 1;m_matrix[25] = 1;m_matrix[34] = 1;
                m_matrix[43] = 1;m_matrix[52] = 1;
                return m_matrix;
            }
        case LevelScreenTypeType69:
            {
                int arraySize = sizeof(bool) * MATRIX_WIDTH * MATRIX_HEIGHT;
                bool* m_matrix = (bool*)malloc(arraySize);
                memset((void*)m_matrix, 0, arraySize);
                memset((void*)m_matrix, 1, 36);
                memset((void*)m_matrix, 0, 18);
                return m_matrix;
            }


    }
    return NULL;
}
